package main.java.com.xinqi;




/**
 * @author xin麒
 * @date 2023/2/16 22:00
 */
public class MyRedisIdTest {
    public static void main(String[] args) {

        long number = 1;
        for (int i = 0; i < 31; i++) {
            number *= 2;
        }
        System.out.println("number is " + number);
        System.out.println(number / (365 * 24 * 60 * 60));
        //  天  时    分   秒
        System.out.println("===============提高精度===============");
        //换一种更精确的
        double numberDouble = 1;
        for (int i = 0; i < 31; i++) {
            numberDouble *= 2;
        }
        System.out.println("numberDouble is " + numberDouble);
        System.out.println(numberDouble / (365 * 24 * 60 * 60));
    }
}
